package com.xposed.aliproxy.utils;

import android.annotation.SuppressLint;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;

/**
 * SP操作类
 */
public class ParamConfig {
    private static ParamConfig mInstance;
    private SharedPreferences sharedPreferences;
    private Editor editor;

    public static ParamConfig getInstance(Context context) {
        if (mInstance == null) {
            mInstance = new ParamConfig(context);
        }
        return mInstance;
    }

    @SuppressLint({"WrongConstant"})
    public ParamConfig(Context context) {
        this.sharedPreferences = context.getSharedPreferences("config", Context.MODE_APPEND);
        editor = this.sharedPreferences.edit();
    }

    /* renamed from: a */
    public boolean putString(String str, String str2) {
        this.editor.putString(str, str2);
        return this.editor.commit();
    }

    /* renamed from: b */
    public String getString(String str, String str2) {
        return this.sharedPreferences.getString(str, str2);
    }

    /* renamed from: a */
    public void remove(String str) {
        this.editor.remove(str);
        this.editor.commit();
    }
}
